
#ifndef _SVRLIST_H_
#define _SVRLIST_H_

#ifdef __Win32__
#pragma warning(disable:4786)
#endif


#include <vector>
#include "OSMutex.h"
#include "OSHeaders.h"


using  namespace	std;

class CSvrList;

extern CSvrList * g_svrList;

typedef struct  {
	char	strIP[20];
	UInt16  port;
}	svrListElem ;

class CSvrList
{
public:	
	
	static CSvrList*	GetInstance();
	static void			DelInstance();

	static UInt16		SetSvrList(char ** svr, UInt16 len);
	static Bool			AddSvr(char* svr, UInt16 port);
//	static UInt32		GetOneSvrAddrI( int readAtList);
	static char*		GetOneSvrAddrS( int readAtList);
	static UInt16		GetPort(int readAtList);
	static UInt16		GetSize() {return m_svrList.size();}
private:
	CSvrList();
	~CSvrList();
	static CSvrList*			m_pSvrList;	
	static vector<svrListElem>	m_svrList;	
	static OSMutex				m_svrListMutex;	
};

#endif


